-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use KvikIO to enable file's fast host read and host write #17764
base: branch-25.04
Are you sure you want to change the base?
Use KvikIO to enable file's fast host read and host write #17764
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
/ok to test |
1d2ed1e
to
2f045b4
Compare
/ok to test |
e6847aa
to
d1932df
Compare
/ok to test |
d1932df
to
183baf8
Compare
f869d9e
to
343228a
Compare
@@ -79,7 +79,6 @@ option(CUDA_ENABLE_LINEINFO | |||
option(CUDA_WARNINGS_AS_ERRORS "Enable -Werror=all-warnings for all CUDA compilation" ON) | |||
# cudart can be statically linked or dynamically linked. The python ecosystem wants dynamic linking | |||
option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF) | |||
option(CUDA_STATIC_CUFILE "Statically link cuFile" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have downstream applications depend on this static cuFile library. We probably should keep this option, and forward it to KvikIO (and also add the static cuFile support there). What do you think? @vuule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no context on why this option exists. Maybe @robertmaynard or @bdice can help here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would assume that it's for Spark builds. It was added in #17315 by @KyleFromNVIDIA so he should confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I need some help on this. In both KvikIO and cuDF's C++ code, we use dlopen
to dynamically load the cuFile shared library at runtime. So I'm wondering (1) why we still need to link to the cuFile shared library via target_link_libraries
at compile-time, and (2) how the cuFile static library is useful to us? (3) Is it possible that the compile-time linking is only necessary for our java code, but not C++? Thanks for any pointer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need the compile-time linking any more for the dynamic library cases if we switch over to using kvikio entirely. I can link you to some Slack threads on that topic. I am less certain about the static library case, in particular what we can assume about cufile's availability as a dynamic library on the target systems where the Spark plugin is deployed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, aside from the CUDA_STATIC_CUFILE
thread
Thank you for handling this!
// Workaround for https://github.com/rapidsai/cudf/issues/14140, where cuFileDriverOpen errors | ||
// out if no CUDA calls have been made before it. This is a no-op if the CUDA context is already | ||
// initialized. | ||
cudaFree(nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fits perfectly here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Description
This PR makes the following improvements on I/O:
host_read
(forfile_source
) andhost_write
(forfile_sink
) with KvikIO's parallel counterpart.Closes #16418
Issue #17228
Checklist